package Home_Work.src.day02;

import java.util.Arrays;
import java.util.Scanner;

/**
 * 输入一个IP地址，然后将4段数字分别输出
 * @author Bonnie
 *
 */
public class Test03 {
	public static void main(String[] args) {
		Scanner console = new Scanner(System.in);

			loop1: while(true) {
				String s = console.nextLine();
				boolean isMat = s.matches("[0-5]{3}\\.[0-5]{3}\\.[0-5]{3}\\.[0-5]{3}");
			if(isMat) {
				String[] ss = s.split("\\."); 
				System.out.println(Arrays.toString(ss));
				for(int i = 0 ; i < ss.length ; i ++) {
					System.out.println(ss[i]);
				
				}
				
				break loop1;
			}
		}
	}
}
